]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
authPrompt: don't allow next if entry is empty
authorRay Strode <rstrode@redhat.com>
Wed, 22 Jul 2015 18:52:22 +0000 (14:52 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 24 Jul 2015 13:44:23 +0000 (09:44 -0400)
Normally the user isn't allowed to proceed passed
the username question until they've filled it in.
To ensure this, the authprompt code desensitizes
the next button when the number of characters change to
zero.

Unfortunately it fails to desensitize the next button
up front when the entry starts out empty.

This commit addresses that bug.

https://bugzilla.gnome.org/show_bug.cgi?id=752739

js/gdm/authPrompt.js

index a5c6862a91365cf0f0a4b5ee2ec7a4e62a4b222d..6e5c79f20f0959fdd73ac29d9d590a5c79a19fc3 100644 (file)
@@ -401,7 +401,7 @@ const AuthPrompt = new Lang.Class({
     },
 
     updateSensitivity: function(sensitive) {
-        this._updateNextButtonSensitivity(sensitive);
+        this._updateNextButtonSensitivity(sensitive && this._entry.text.length > 0);
         this._entry.reactive = sensitive;
         this._entry.clutter_text.editable = sensitive;
     },